const { defineConfig } = require('@vue/cli-service')
const webpack = require('webpack')
module.exports = defineConfig({
  chainWebpack: config => {
    config.plugin('provide').use(webpack.ProvidePlugin, [{
      $: 'jquery',
      jquery: 'jquery',
      jQuery: 'jquery',
      'window.jQuery': 'jquery'
    }])
  },
  transpileDependencies: true,
  lintOnSave:false,
  devServer: {
    port: 8099, // 端口
    allowedHosts: "all", // 绕过主机检查
    proxy:{
      '/api':{
        target: 'http://localhost:9000',
        changeOrigin:true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  }
})
